# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-color-manager
pkgver=3.36.0+r51+gcf7ee2b5
pkgrel=1
pkgdesc="GNOME Color Profile Tools"
url="https://gitlab.gnome.org/GNOME/gnome-color-manager"
arch=(loong64 x86_64)
license=(GPL2)
depends=(
  colord
  glib2
  gtk3
  lcms2
)
makedepends=(
  appstream-glib
  docbook-sgml
  docbook-utils
  git
  meson
  perl-sgmls
  yelp-tools
)
checkdepends=(xorg-server-xvfb)
groups=(gnome)
_commit=cf7ee2b512c55ca96764aa3015b2ddbaea716b76  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-color-manager.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_COLOR_MANAGER_//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  dbus-run-session xvfb-run -s '-nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
